/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       combat_results_dialog.h

	$Header: /game/combat_results_dialog.h $

	$NoKeywords: $

 ************************************************************************/
#ifndef COMBAT_RESULTS_DIALOG_H_INCLUDED
#define COMBAT_RESULTS_DIALOG_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include <vector>
#include "adv_map_point.h"
#include "bitmap_group_ptr.h"
#include "bitmap_layer_window.h"
#include "bitmap_layer_window_ptr.h"
#include "creature_stack_ptr.h"
#include "dialog_box.h"
#include "font_cache.h"
#include "material_array.h"
#include "skill_icon_ptr.h"
#include "text_window_ptr.h"


enum  t_combat_result;
class t_combat_context;
class t_creature_array;
class t_creature_stack;
class t_player;
class t_town;

// ---------------------------------------------------------------------
// combat_results creatures dialog
// ---------------------------------------------------------------------
class t_combat_results_dialog : public t_bitmap_layer_window
{
public:
	t_combat_results_dialog( t_window*				parent, 
							 t_creature_array**		armies,
							 t_player**				players,
							 t_creature_array*		losses,
							 t_combat_result		result,
							 t_town const*			town,
							 t_adv_map_point const&	location,
							 t_creature_stack_ptr ( & leaders )[ 2 ] );

protected:
	t_text_window* add_text( std::string const& text, std::string const& layer_name, 
		                     int size, bool size_explicit = false, bool center_vertical = false );
	t_text_window* add_text_creature_select( std::string const& text, std::string const& layer_name, 
		                     int size, t_screen_point point, bool size_explicit = false );
	void           ok_clicked( t_button* button );
	void           create_buttons();
	void           create_icons();
	void           create_text();
	void		   initialize();
		          
	t_creature_array*		m_armies[2];
	t_bitmap_group_ptr		m_creatures_lost_layout;
	t_bitmap_group_ptr		m_hero_icons;
	t_bitmap_group_ptr		m_layout;
	t_creature_stack_ptr 	m_leaders[2];
	t_adv_map_point			m_location;
	t_creature_array*		m_losses;
	t_window*				m_parent; 
	t_player*				m_players[2];
	t_combat_result			m_result;
	t_text_window*			m_title;
	t_town const*			m_town;
};

// ---------------------------------------------------------------------
// inlines for t_combat_results_dialog
// ---------------------------------------------------------------------

#endif // COMBAT_RESULTS_DIALOG_H_INCLUDED